package com.line.config.auth;

import com.line.config.cons.BasicCons;
import com.line.model.pojo.PrincipalPojo;

public class AuthHandler {

	/**
	 * 从当前线程获取用户ID信息
	 *
	 * @return 用户ID
	 */
	public static Long getCurUserId() {
		PrincipalPojo pojo = BasicCons.AUTH_THREADLOCAL.get();
		if (pojo.getUserId() == null) {
			return 0l;
		}
		return pojo.getUserId();
	}

}
